package com.example.file.Controller;
import com.example.file.service.Impl.SysFileInfoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import com.example.file.service.SysFileInfoService;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController
@RequestMapping("/chart")
public class SysfileinfoController {
    @Autowired
    private SysFileInfoService sysFileInfoService;

    @Autowired
    private SysFileInfoServiceImpl service;

    @PostMapping("/fileUpload")
    public Map<String,Object> fileUpload(@RequestParam(value = "file") MultipartFile file, HttpServletRequest request ) {
        Map<String, Object> respMap = sysFileInfoService.imageUpload(file, request);
        return respMap;
    }


}
